CXXFLAGS += -I../drivingBehaviourDetection_demo/libopencv_api/include
CXXFLAGS += -I../drivingBehaviourDetection_demo/librknn_api/include
CXXFLAGS += -I../drivingBehaviourDetection_demo/include
CXXFLAGS += -I./

CXXFLAGS += -L../drivingBehaviourDetection_demo/libopencv_api/lib
CXXFLAGS += -L../drivingBehaviourDetection_demo/librknn_api/lib
LD_OPENCV_LIBS += -lopencv_objdetect -lopencv_calib3d -lopencv_flann -lopencv_features2d -lopencv_imgproc -lopencv_dnn -lopencv_imgcodecs  -lopencv_core  -lopencv_videoio  
LD_RKNN_LIBS += -lrknn_api

SOURCE_CC = $(wildcard *.cc)

CC_OBJS = $(patsubst %.cc, %.o,$(SOURCE_CC))

TARGET := calcMap

C = /home/pwt/[1]Rockchip/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
CXX = /home/pwt/[1]Rockchip/gcc/linux-x86/arm/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ 

.PHONY : clean all

all: $(TARGET)
	#@echo $(C_OBJS)
	#@echo $(SOURCE_C)

$(TARGET):     $(CC_OBJS)
	$(CXX) $(CXXFLAGS)  -lpthread -lm -ldl -o $@ $^ -Wl,--start-group ${LD_RKNN_LIBS} ${LD_OPENCV_LIBS} -Wl,--end-group

$(CC_OBJS):	%.o:%.cc
	$(CXX) $(CXXFLAGS)  -c $^ -o $@	
clean:
	@rm -f $(TARGET)  $(CC_OBJS)
	
	
	
	
	
